package com.itheima.demo6;

public class ThreadDemo5 {
    public static void main(String[] args) {
        //同步方法：

        MyRun2 mr = new MyRun2();

        //直接创建MyThread对象
        Thread t1 = new Thread(mr, "窗口1");
        Thread t2 = new Thread(mr, "窗口2");
        Thread t3 = new Thread(mr, "窗口3");

        t1.start();
        t2.start();
        t3.start();


    }
}
